﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class calculate
    {
        protected int a { get; set; }
        protected int b { get; set; }
        public calculate(int a, int b)
        {
            this.a = a;
            this.b = b;
        }
        public virtual void DisplayResult()
        {
            Console.WriteLine();
        }
    }
    class DAmei : calculate
    {
        public DAmei(int a, int b) : base(a, b)
        {

        }
        public override void DisplayResult()
        {
            Console.WriteLine(a + b);
        }
    }
    class DAmei1 : calculate
    {
        public DAmei1(int a, int b) : base(a, b)
        {

        }
        public override void DisplayResult()
        {
            Console.WriteLine(a * b);
        }
    }
    class DAmei2 : calculate
    {
        public DAmei2(int a, int b) : base(a, b)
        {

        }
        public override void DisplayResult()
        {
            Console.WriteLine(a / b);
        }
    }
    class PublicClculate
    {
        public static void PublicClculatetest(calculate calculate)
        {
            calculate.DisplayResult();
        }
    }
}
